/**
 * 获取生成Base64状态码
 * @param {*} url 
 * @param {*} callback 
 */
function getBase64(url,callback) {
    let Img = new Image();
    Img.crossOrigin = 'anonymous'
    Img.src = url;
    Img.onload = function() {
        let canvas = document.createElement('canvas');
        canvas.width = Img.width;
        canvas.height = Img.height;
        let ctx = canvas.getContext('2d');
        ctx.drawImage(Img,0,0)
        let IconURL = canvas.toDataURL('image/png');
        callback ? callback(IconURL):null;
    }
}

